<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style>
.bold{
	font-style: italic;
}
.size{
	font-size: 50px;
}
</style>
<script>
	window.addEventListener("load", function(){
		var hideStatus = true;
		var hidden = document.querySelector("#target");
		var click = document.getElementById("click");
		click.addEventListener("click", function(){
			if(hideStatus){
				hidden.style.color="red"
				click.innerHTML = "보이기"
				hideStatus=false;
			}else{
				hidden.style.color="blue";
				click.innerHTML = "숨김";
				hideStatus=true;
			}
		});
		document.getElementById("change").addEventListener("click", function(){
			if(hideStatus){
				hidden.className="bold size";
				hideStatus=false;
			}else{
				hidden.className="size bold";
				hideStatus=true;
			}
		});
	});
</script>
</head>
<body>
	<h1  id="target">이건 타이틀</h1>
	<button id="click">숨김</button>
	<button id="change">style</button>
</body>
</html>